﻿
Option Strict On : Option Explicit On : Option Compare Binary : Option Infer On

Imports System
Imports System.Collections.ObjectModel
Imports System.Text.RegularExpressions


Namespace Code.Coloriser

    ''' <summary>
    ''' Default code coloriser for Batch
    ''' </summary>
    ''' <remarks></remarks>
    Friend Class BatchCodeColoriser
        Inherits IColorTokenProvider

        'Sub New()
        '    'Me.Keywords = New String() {"auto", "break", "case", "cdecl", "char", "const", "continue", "default", _
        '    '                            "do", "double", "else", "enum", "extern", "far", "float", "for", "fortran", _
        '    '                            "goto", "huge", "if", "int", "interrupt", "long", "near", "pascal", _
        '    '                            "register", "return", "short", "signed", "sizeof", "static", "struct", _
        '    '                            "switch", "typedef", "union", "unsigned", "void", "volatile", "while"}

        '    'Me.m_stringOrCharRegexStr = "("".*?"")"
        '    'Me.m_commentRegexStr = ":.*"
        'End Sub


        Public Overrides ReadOnly Property CaseSensitive() As Boolean
            Get
                Return False
            End Get
        End Property


        Protected Overrides ReadOnly Property CommentRegexStr() As String
            Get
                Return ":[^\r\n]*"
            End Get
        End Property


        Protected Overrides ReadOnly Property StringOrCharRegexStr() As String
            Get
                Return """""|""[^\r\n]*?"""
            End Get
        End Property


        Protected Overrides ReadOnly Property Keywords() As String
            Get
                Return "auto break case cdecl char const continue default " _
                & "do double else enum extern far float for fortran " _
                & "goto huge if int interrupt long near pascal " _
                & "register return short signed sizeof static struct " _
                & "switch typedef union unsigned void volatile while"
            End Get
        End Property

    End Class

End Namespace





